import Vue from 'vue'
import Router from 'vue-router'

// 基本功能
import Login from '@/components/Login' // 布局
import Error from '@/components/Error' // Error
import Layout from '@/components/Layout' // 布局
import Console from '@/components/Console' // 控制台
import UserProfile from '@/components/UserProfile' // 用户概况

// 小程序设置
import IndexTempletManage from '@/components/WechatAppConfig/IndexTempletManage' // 小程序首页设置
import OrderTempletManage from '@/components/WechatAppConfig/OrderTempletManage' // 小程序下单设置
import UserCenterManage from '@/components/WechatAppConfig/UserCenterManage' // 小程序用户中心设置
import NavManage from '@/components/WechatAppConfig/NavManage' // 小程序导航设置

// 基本设置
import ProcedureConfig from '@/components/BasicConfig/ProcedureConfig' // 小程序设置
import PaymentConfig from '@/components/BasicConfig/PaymentConfig' // 支付设置
import ClauseConfig from '@/components/BasicConfig/ClauseConfig' // 条款设置
import ClauseEditer from '@/components/BasicConfig/ClauseEditer' // 条款编辑
import NoticeConfig from '@/components/BasicConfig/NoticeConfig' // 公告管理
import NoticeEditer from '@/components/BasicConfig/NoticeEditer' // 公告编辑
import BankConfig from '@/components/BasicConfig/BankConfig' // 开户行管理
import BankEditer from '@/components/BasicConfig/BankEditer' // 开户行编辑
import CommercialTenantConfig from '@/components/BasicConfig/CommercialTenantConfig' // 商家设置
import LabelSetting from '@/components/BasicConfig/LabelSetting' // 标签设置
import SmsSetting from '@/components/BasicConfig/SmsSetting' // 短信设置
import TerritorialRestriction from '@/components/BasicConfig/TerritorialRestriction' // 区域限制
import WechatConfig from '@/components/BasicConfig/WechatConfig' // 微信公众号设置
import TempletMessageConfig from '@/components/BasicConfig/TempletMessageConfig' // 订阅消息设置
import FileUploadConfig from '@/components/BasicConfig/FileUploadConfig' // 文件上传设置
import UserAdvice from '@/components/BasicConfig/UserAdvice' // 用户须知
import UserAdviceEditer from '@/components/BasicConfig/UserAdviceEditer' // 用户须知编辑
import Baiduconfig from '@/components/BasicConfig/Baiduconfig' // 用户须知编辑
// 任务大厅
import AssignmentAllot from '@/components/AssignmentHall/AssignmentAllot' // 任务分配
import map from '@/components/AssignmentHall/map' // 地图

// 订单管理
import OrderTabulation from '@/components/OrderManagement/OrderTabulation' // 订单列表
import OrderComment from '@/components/OrderManagement/OrderComment' // 订单评论列表
import OrderComplaint from '@/components/OrderManagement/OrderComplaint' // 订单投诉列表
import OrderTrack from '@/components/OrderManagement/OrderTrack' // 订单行驶路线
import OrderAdd from '@/components/OrderManagement/OrderAdd' // 订单行驶路线

// 路线规划
import MpathList from '@/components/Mpath/list' // 路线列表
import MpathAdd from '@/components/Mpath/add' // 路线添加
import MpathEdit from '@/components/Mpath/edit' // 路线编辑

// 首页广告
import MadList from '@/components/Mad/list' // 广告列表
import MadAdd from '@/components/Mad/add' // 广告添加
import MadEdit from '@/components/Mad/edit' // 广告编辑

// 服务人员
import ServicePersonalApply from '@/components/ServicePersonal/ServicePersonalApply' // 服务人员申请
import ServicePersonalTabulation from '@/components/ServicePersonal/ServicePersonalTabulation' // 服务人员列表
import ServicePersonalTransactionDetail from '@/components/ServicePersonal/ServicePersonalTransactionDetail' // 交易明细
import ServicePersonalGrade from '@/components/ServicePersonal/ServicePersonalGrade' // 服务人员评价
import AuthorizationService from '@/components/ServicePersonal/AuthorizationService' // 授权服务
import ServiceRefundPromiseMoney from '@/components/ServicePersonal/ServiceRefundPromiseMoney' // 服务人员保证金退款

// 顾客
import AssociatorGrade from '@/components/ConsumerManagement/AssociatorGrade' // 会员等级
import GrowthValueConfig from '@/components/ConsumerManagement/GrowthValueConfig' // 成长值设置
import AssociatorGradeEditor from '@/components/ConsumerManagement/AssociatorGradeEditor' // 会员等级编辑
import ConsumerTabulation from '@/components/ConsumerManagement/ConsumerTabulation' // 顾客列表

// 财务管理
import UserDrawMoney from '@/components/FinanceManagement/UserDrawMoney' // 提现申请

// 售后服务
import FeedbackTabulation from '@/components/AfterService/FeedbackTabulation' // 用户反馈列表

// 营销管理
import CouponTabulation from '@/components/MarketingManagement/CouponTabulation' // 优惠券
import CouponEditor from '@/components/MarketingManagement/CouponEditor' // 优惠券编辑
import FullSubtractionTabulation from '@/components/MarketingManagement/FullSubtractionTabulation' // 满减奖励
import FullSubtractionEditor from '@/components/MarketingManagement/FullSubtractionEditor' // 满减奖励编辑
import ReceivingOrderRewardTabulation from '@/components/MarketingManagement/ReceivingOrderRewardTabulation' // 接单奖励
import ReceivingOrderRewardEditor from '@/components/MarketingManagement/ReceivingOrderRewardEditor' // 接单奖励编辑

// 平台设置
import CashDepositGradeManagement from '@/components/PlatformConfig/CashDepositGradeManagement' // 保证金管理
import CashDepositGradeEditor from '@/components/PlatformConfig/CashDepositGradeEditor' // 保证金编辑
import PlatformPriceModelConfig from '@/components/PlatformConfig/PlatformPriceModelConfig' // 计费管理
import DistanceFreightTempletManagement from '@/components/PlatformConfig/DistanceFreightTempletManagement' // 距离运费模板管理
import DistanceFreightTempletEditor from '@/components/PlatformConfig/DistanceFreightTempletEditor' // 距离运费模板编辑
import WeightFreightTempletManagement from '@/components/PlatformConfig/WeightFreightTempletManagement' // 重量运费模板管理
import WeightFreightTempletEditor from '@/components/PlatformConfig/WeightFreightTempletEditor' // 重量运费模板编辑
import FellInFreightTempletManagement from '@/components/PlatformConfig/FellInFreightTempletManagement' // 排队金额模板管理
import FellInFreightTempletEditor from '@/components/PlatformConfig/FellInFreightTempletEditor' // 排队金额模板编辑
import TimedFreightTempletManagement from '@/components/PlatformConfig/TimedFreightTempletManagement' // 定时运费模板管理
import TimedFreightTempletEditor from '@/components/PlatformConfig/TimedFreightTempletEditor' // 定时运费模板编辑

// 系统设置
import SystemInfo from '@/components/SystemConfig/SystemInfo' // 系统信息
import WxAppletUpload from '@/components/SystemConfig/WxAppletUpload' // 小程序上传


// 数据统计
import PlatformOrderStatistic from '@/components/DataStatistics/PlatformOrderStatistic' // 平台订单统计数据
import UserStatistic from '@/components/DataStatistics/UserStatistic' // 用户数据统计
import OrderStatistic from '@/components/DataStatistics/OrderStatistic' // 订单数据统计
import ServicePersonalStatistic from '@/components/DataStatistics/ServicePersonalStatistic' // 服务人员数据统计


// 服务人员
import DistributorApplication from '@/components/Distributors/DistributorApplication' // 分销人员申请
import DistributionPersonnel from '@/components/Distributors/DistributionPersonnel' // 分销人员列表
import DistributionWithdrawal from '@/components/Distributors/DistributionWithdrawal' // 分销人员提现
import DistributionOrder from '@/components/Distributors/DistributionOrder' // 分销人员订单
import DistibutionSetting from '@/components/Distributors/DistibutionSetting' // 分销设置

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Layout',
      component: Layout,
      props: true,
      meta: {
        breadcrumbName: '首页'
      },
      children: [
        // 基本功能
        {
          path: '/',
          name: 'Console',
          component: Console,
          meta: {
            breadcrumbName: '控制台'
          }
        },
        {
          path: '/UserProfile',
          name: 'UserProfile',
          component: UserProfile,
          meta: {
            breadcrumbName: '用户概况'
          }
        },
        // 小程序设置设置
        {
          path: '/WechatAppConfig/IndexTempletManage',
          name: 'IndexTempletManage',
          component: IndexTempletManage,
          meta: {
            breadcrumbName: '小程序首页设置'
          }
        },
        {
          path: '/WechatAppConfig/OrderTempletManage',
          name: 'OrderTempletManage',
          component: OrderTempletManage,
          meta: {
            breadcrumbName: '小程序下单设置'
          }
        },
        {
          path: '/WechatAppConfig/UserCenterManage',
          name: 'UserCenterManage',
          component: UserCenterManage,
          meta: {
            breadcrumbName: '小程序用户中心设置'
          }
        },
        {
          path: '/WechatAppConfig/NavManage',
          name: 'NavManage',
          component: NavManage,
          meta: {
            breadcrumbName: '小程序导航设置'
          }
        },
        // 基本设置
        {
          path: '/BasicConfig/ProcedureConfig',
          name: 'ProcedureConfig',
          component: ProcedureConfig,
          meta: {
            breadcrumbName: '小程序设置'
          }
        },
        {
          path: '/BasicConfig/PaymentConfig',
          name: 'PaymentConfig',
          component: PaymentConfig,
          meta: {
            breadcrumbName: '支付设置'
          }
        },
        {
          path: '/BasicConfig/ClauseConfig',
          name: 'ClauseConfig',
          component: ClauseConfig,
          meta: {
            breadcrumbName: '条款设置'
          }
        },
        {
          path: '/BasicConfig/ClauseEditer',
          name: 'ClauseEditer',
          component: ClauseEditer,
          props: true,
          meta: {
            breadcrumbName: '条款编辑'
          }
        },
        {
          path: '/BasicConfig/NoticeConfig',
          name: 'NoticeConfig',
          component: NoticeConfig,
          meta: {
            breadcrumbName: '公告管理'
          }
        },
        {
          path: '/BasicConfig/NoticeEditer',
          name: 'NoticeEditer',
          component: NoticeEditer,
          props: true,
          meta: {
            breadcrumbName: '公告编辑'
          }
        },
        {
          path: '/BasicConfig/BankConfig',
          name: 'BankConfig',
          component: BankConfig,
          meta: {
            breadcrumbName: '开户行管理'
          }
        },
        {
          path: '/BasicConfig/BankEditer',
          name: 'BankEditer',
          component: BankEditer,
          props: true,
          meta: {
            breadcrumbName: '开户行编辑'
          }
        },
        {
          path: '/BasicConfig/CommercialTenantConfig',
          name: 'CommercialTenantConfig',
          component: CommercialTenantConfig,
          meta: {
            breadcrumbName: '商家设置'
          }
        },
        {
          path: '/BasicConfig/LabelSetting',
          name: 'LabelSetting',
          component: LabelSetting,
          meta: {
            breadcrumbName: '标签设置'
          }
        },
        {
          path: '/BasicConfig/SmsSetting',
          name: 'SmsSetting',
          component: SmsSetting,
          meta: {
            breadcrumbName: '短信设置'
          }
        },
        {
          path: '/BasicConfig/TerritorialRestriction',
          name: 'TerritorialRestriction',
          component: TerritorialRestriction,
          meta: {
            breadcrumbName: '区域限制'
          }
        },
        {
          path: '/BasicConfig/WechatConfig',
          name: 'WechatConfig',
          component: WechatConfig,
          meta: {
            breadcrumbName: '微信公众号设置'
          }
        },
        {
          path: '/BasicConfig/TempletMessageConfig',
          name: 'TempletMessageConfig',
          component: TempletMessageConfig,
          meta: {
            breadcrumbName: '订阅消息设置'
          }
        },
        {
          path: '/BasicConfig/FileUploadConfig',
          name: 'FileUploadConfig',
          component: FileUploadConfig,
          meta: {
            breadcrumbName: '文件上传设置'
          }
        },
        {
          path: '/BasicConfig/UserAdvice',
          name: 'UserAdvice',
          component: UserAdvice,
          meta: {
            breadcrumbName: '用户须知'
          }
        },
        {
          path: '/BasicConfig/UserAdviceEditer',
          name: 'UserAdviceEditer',
          component: UserAdviceEditer,
          props: true,
          meta: {
            breadcrumbName: '用户须知编辑'
          }
        },
		{
			path: '/BasicConfig/Baiduconfig',
			name: 'Baiduconfig',
			component: Baiduconfig,
			props: true,
			meta: {
				breadcrumbName: '百度API配置'
			}
		},
        // 任务大厅
        {
          path: '/AssignmentHall/AssignmentAllot',
          name: 'AssignmentAllot',
          component: AssignmentAllot,
          meta: {
            breadcrumbName: '任务分配'
          }
        },
        {
          path: '/AssignmentHall/map',
          name: 'map',
          component: map,
          meta:{
            breadcrumbName:'地图'
          }
        },
        // 路线规划
        {
          path: '/Mpath/list',
          name: 'MpathList',
          component: MpathList,
          meta: {
            breadcrumbName: '路线列表'
          }
        },
        {
          path: '/Mpath/add',
          name: 'MpathAdd',
          component: MpathAdd,
          meta: {
            breadcrumbName: '路线添加'
          }
        },
        {
          path: '/Mpath/edit/:id',
          name: 'MpathEdit',
          component: MpathEdit,
          meta: {
            breadcrumbName: '路线编辑'
          }
        },
        // 首页广告
        {
          path: '/Mad/list',
          name: 'MadList',
          component: MadList,
          meta: {
            breadcrumbName: '广告列表'
          }
        },
        {
          path: '/Mad/add',
          name: 'MadAdd',
          component: MadAdd,
          meta: {
            breadcrumbName: '广告添加'
          }
        },
        {
          path: '/Mad/edit/:id',
          name: 'MadEdit',
          component: MadEdit,
          meta: {
            breadcrumbName: '广告编辑'
          }
        },
        // 订单管理
        {
          path: '/OrderManagement/OrderTabulation',
          name: 'OrderTabulation',
          component: OrderTabulation,
          meta: {
            breadcrumbName: '订单列表'
          }
        },
        {
          path: '/OrderManagement/OrderComment',
          name: 'OrderComment',
          component: OrderComment,
          meta: {
            breadcrumbName: '订单评论列表'
          }
        },
        {
          path: '/OrderManagement/OrderTrack',
          name: 'OrderTrack',
          component: OrderTrack,
          meta: {
            breadcrumbName: '订单路线'
          }
        },
        {
          path: '/OrderManagement/OrderAdd',
          name: 'OrderAdd',
          component: OrderAdd,
          meta: {
            breadcrumbName: '添加订单'
          }
        },
        {
          path: '/OrderManagement/OrderComplaint',
          name: 'OrderComplaint',
          component: OrderComplaint,
          meta: {
            breadcrumbName: '订单投诉列表'
          }
        },
        // 配送人员
        {
          path: '/ServicePersonal/ServicePersonalApply',
          name: 'ServicePersonalApply',
          component: ServicePersonalApply,
          meta: {
            breadcrumbName: '服务人员申请'
          }
        },
        {
          path: '/ServicePersonal/ServicePersonalTabulation',
          name: 'ServicePersonalTabulation',
          component: ServicePersonalTabulation,
          meta: {
            breadcrumbName: '服务人员列表'
          }
        },
        {
          path: '/ServicePersonal/ServicePersonalTransactionDetail',
          name: 'ServicePersonalTransactionDetail',
          component: ServicePersonalTransactionDetail,
          meta: {
            breadcrumbName: '交易明细'
          }
        },
        {
          path: '/ServicePersonal/ServicePersonalGrade',
          name: 'ServicePersonalGrade',
          component: ServicePersonalGrade,
          meta: {
            breadcrumbName: '服务人员评价'
          }
        },
        {
          path: '/ServicePersonal/AuthorizationService',
          name: 'AuthorizationService',
          component: AuthorizationService,
          meta: {
            breadcrumbName: '授权服务'
          }
        },
        {
          path: '/ServicePersonal/ServiceRefundPromiseMoney',
          name: 'ServiceRefundPromiseMoney',
          component: ServiceRefundPromiseMoney,
          meta: {
            breadcrumbName: '服务人员保证金退款'
          }
        },
        // 顾客
        {
          path: '/ConsumerManagement/AssociatorGrade',
          name: 'AssociatorGrade',
          component: AssociatorGrade,
          meta: {
            breadcrumbName: '会员等级'
          }
        },
        {
          path: '/ConsumerManagement/GrowthValueConfig',
          name: 'GrowthValueConfig',
          component: GrowthValueConfig,
          meta: {
            breadcrumbName: '会员成长值设置'
          }
        },
        {
          path: '/ConsumerManagement/AssociatorGradeEditor',
          name: 'AssociatorGradeEditor',
          component: AssociatorGradeEditor,
          props: true,
          meta: {
            breadcrumbName: '会员等级编辑'
          }
        },
        {
          path: '/ConsumerManagement/ConsumerTabulation',
          name: 'ConsumerTabulation',
          component: ConsumerTabulation,
          meta: {
            breadcrumbName: '顾客列表'
          }
        },
        // 财务管理
        {
          path: '/FinanceManagement/UserDrawMoney',
          name: 'UserDrawMoney',
          component: UserDrawMoney,
          meta: {
            breadcrumbName: '提现申请'
          }
        },
        // 售后服务
        {
          path: '/AfterService/FeedbackTabulation',
          name: 'FeedbackTabulation',
          component: FeedbackTabulation,
          meta: {
            breadcrumbName: '用户反馈列表'
          }
        },
        // 营销管理
        {
          path: '/MarketingManagement/CouponTabulation',
          name: 'CouponTabulation',
          component: CouponTabulation,
          meta: {
            breadcrumbName: '优惠券'
          }
        },
        {
          path: '/MarketingManagement/CouponEditor',
          name: 'CouponEditor',
          component: CouponEditor,
          props: true,
          meta: {
            breadcrumbName: '优惠券编辑'
          }
        },
        {
          path: '/MarketingManagement/FullSubtractionTabulation',
          name: 'FullSubtractionTabulation',
          component: FullSubtractionTabulation,
          meta: {
            breadcrumbName: '满减奖励'
          }
        },
        {
          path: '/MarketingManagement/FullSubtractionEditor',
          name: 'FullSubtractionEditor',
          component: FullSubtractionEditor,
          props: true,
          meta: {
            breadcrumbName: '满减奖励编辑'
          }
        },
        {
          path: '/MarketingManagement/ReceivingOrderRewardTabulation',
          name: 'ReceivingOrderRewardTabulation',
          component: ReceivingOrderRewardTabulation,
          meta: {
            breadcrumbName: '接单奖励'
          }
        },
        {
          path: '/MarketingManagement/ReceivingOrderRewardEditor',
          name: 'ReceivingOrderRewardEditor',
          component: ReceivingOrderRewardEditor,
          props: true,
          meta: {
            breadcrumbName: '接单奖励编辑'
          }
        },
        // 平台设置
        {
          path: '/PlatformConfig/CashDepositGradeManagement',
          name: 'CashDepositGradeManagement',
          component: CashDepositGradeManagement,
          meta: {
            breadcrumbName: '保证金管理'
          }
        },
        {
          path: '/PlatformConfig/CashDepositGradeEditor',
          name: 'CashDepositGradeEditor',
          component: CashDepositGradeEditor,
          props: true,
          meta: {
            breadcrumbName: '保证金编辑'
          }
        },
        {
          path: '/PlatformConfig/PlatformPriceModelConfig',
          name: 'PlatformPriceModelConfig',
          component: PlatformPriceModelConfig,
          meta: {
            breadcrumbName: '计费设置'
          }
        },
        {
          path: '/PlatformConfig/DistanceFreightTempletManagement',
          name: 'DistanceFreightTempletManagement',
          component: DistanceFreightTempletManagement,
          meta: {
            breadcrumbName: '距离运费模板管理'
          }
        },
        {
          path: '/PlatformConfig/DistanceFreightTempletEditor',
          name: 'DistanceFreightTempletEditor',
          component: DistanceFreightTempletEditor,
          props: true,
          meta: {
            breadcrumbName: '距离运费模板编辑'
          }
        },
        {
          path: '/PlatformConfig/WeightFreightTempletManagement',
          name: 'WeightFreightTempletManagement',
          component: WeightFreightTempletManagement,
          meta: {
            breadcrumbName: '重量运费模板管理'
          }
        },
        {
          path: '/PlatformConfig/WeightFreightTempletEditor',
          name: 'WeightFreightTempletEditor',
          component: WeightFreightTempletEditor,
          props: true,
          meta: {
            breadcrumbName: '重量运费模板编辑'
          }
        },
        {
          path: '/PlatformConfig/FellInFreightTempletManagement',
          name: 'FellInFreightTempletManagement',
          component: FellInFreightTempletManagement,
          meta: {
            breadcrumbName: '排队金额模板管理'
          }
        },
        {
          path: '/PlatformConfig/FellInFreightTempletEditor',
          name: 'FellInFreightTempletEditor',
          component: FellInFreightTempletEditor,
          props: true,
          meta: {
            breadcrumbName: '排队金额模板编辑'
          }
        },
        {
          path: '/PlatformConfig/TimedFreightTempletManagement',
          name: 'TimedFreightTempletManagement',
          component: TimedFreightTempletManagement,
          meta: {
            breadcrumbName: '定时运费模板管理'
          }
        },
        {
          path: '/PlatformConfig/TimedFreightTempletEditor',
          name: 'TimedFreightTempletEditor',
          component: TimedFreightTempletEditor,
          props: true,
          meta: {
            breadcrumbName: '定时运费模板编辑'
          }
        },
        // 系统设置
        {
          path: '/SystemConfig/SystemInfo',
          name: 'SystemInfo',
          component: SystemInfo,
          meta: {
            breadcrumbName: '系统信息'
          }
        },
        {
          path: '/SystemConfig/WxAppletUpload',
          name: 'WxAppletUpload',
          component: WxAppletUpload,
          meta: {
            breadcrumbName: '小程序上传'
          }
        },
        // 数据统计
        {
          path: '/DataStatistics/PlatformOrderStatistic',
          name: 'PlatformOrderStatistic',
          component: PlatformOrderStatistic,
          meta: {
            breadcrumbName: '平台数据统计'
          }
        },
        {
          path: '/DataStatistics/UserStatistic',
          name: 'UserStatistic',
          component: UserStatistic,
          meta: {
            breadcrumbName: '用户数据统计'
          }
        },
        {
          path: '/DataStatistics/OrderStatistic',
          name: 'OrderStatistic',
          component: OrderStatistic,
          meta: {
            breadcrumbName: '订单数据统计'
          }
        },
        {
          path: '/DataStatistics/ServicePersonalStatistic',
          name: 'ServicePersonalStatistic',
          component: ServicePersonalStatistic,
          meta: {
            breadcrumbName: '服务人员数据统计'
          }
        },
        {
          path: '/Distributors/DistributorApplication',
          name: 'DistributorApplication',
          component: DistributorApplication,
          meta: {
            breadcrumbName: '分销商申请'
          }
        },
        {
          path: '/Distributors/DistributionPersonnel',
          name: 'DistributionPersonnel',
          component:DistributionPersonnel,
          meta: {
            breadcrumbName: '分销商列表'
          }
        },
        {
          path: '/Distributors/DistributionWithdrawal',
          name: 'DistributionWithdrawal',
          component:DistributionWithdrawal,
          meta: {
            breadcrumbName: '分销商提现'
          }
        },
        {
          path: '/Distributors/DistributionOrder',
          name: 'DistributionOrder',
          component:DistributionOrder,
          meta: {
            breadcrumbName: '分销商订单'
          }
        },
        {
          path: '/Distributors/DistibutionSetting',
          name: 'DistibutionSetting',
          component:DistibutionSetting,
          meta: {
            breadcrumbName: '分销设置'
          }
        },
      ]
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
    },
    {
      path: '*',
      name: '*',
      component: Error,
    },
  ]
})
